 IDENTIFICATION DIVISION.
 PROGRAM-ID. XREALCOB.
 AUTHOR. DENNIS OLENICK, OPT-TECH DATA PROCESSING.
***************************************************
 ENVIRONMENT DIVISION.
 CONFIGURATION SECTION.
 SOURCE-COMPUTER. IBM-PC.
 OBJECT-COMPUTER. IBM-PC.
 DATA DIVISION.
 WORKING-STORAGE SECTION.
 01  INFILE        PIC X(25) VALUE 'SAMP.DAT/'.
 01  OUTFILE       PIC X(15) VALUE 'SORTED.DAT/'.
 01  CTL-STMT PIC X(40) VALUE 'S(1,10,C,A)/'.
*-> NOTE THE "/" AFTER THE PARAMETERS IS REQUIRED <- 
 01  NUM-RECS    PIC 999 COMP-5.
 01  RET-CODE    PIC 999 COMP-5.
 01  NUMBER-RECORDS-DISP  PIC 9(5).
 01  STATUS-CODE-DISP     PIC 9(5).
***************************************************
 PROCEDURE DIVISION.
 MAINLINE.
      DISPLAY 'CALLING OPT-TECH SORT...'.
      CALL 'SORTREAL' USING INFILE,
                            OUTFILE,
                            CTL-STMT,
                            NUM-RECS,
                            RET-CODE.
      DISPLAY 'BACK FROM OPT-TECH SORT'.
      MOVE NUM-RECS TO NUMBER-RECORDS-DISP.
      MOVE RET-CODE TO STATUS-CODE-DISP.
      DISPLAY 'NUMBER RECORDS =', NUMBER-RECORDS-DISP.
      DISPLAY 'STATUS CODE    =', STATUS-CODE-DISP.
      STOP RUN.
